from socket import *

HOST = '192.168.40.32'
PORT = 9999

s = socket(AF_INET, SOCK_DGRAM)
s.connect((HOST, PORT))
while True:
    message = input('send message:>>')
    s.sendall(message.encode('utf-8'))
    try:
        data = s.recv(1024)
        print(data)
    except Exception as e:print(e)
